﻿<ribbon:RibbonWindow x:Class="Hisaab.Client.Desktop.View.Shell"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:ribbon="clr-namespace:Fluent;assembly=Fluent"
        xmlns:prism="http://www.codeplex.com/prism" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        xmlns:Helpers="clr-namespace:Hisaab.Client.Common.Helpers;assembly=Hisaab.Client.Common"
        xmlns:Common="clr-namespace:Hisaab.Client.Common;assembly=Hisaab.Client.Common"
        xmlns:nav="clr-namespace:Stema.Controls;assembly=NavigationPane"
        xmlns:l="clr-namespace:Hisaab.Client.Common.Translation;assembly=Hisaab.Client.Common"
        Helpers:RegionPopupBehaviors.CreatePopupRegionWithName="{x:Static Common:Regions.SecondaryRegion}"
        Helpers:RegionPopupBehaviors.ContainerWindowStyle="{StaticResource WindowRegionStyle}"
        Title="{Binding Title}" Height="704" Width="1266" Icon="/Hisaab;component/app.ico">
    <Grid x:Name="LayoutRoot">
        <Grid.RowDefinitions>
            <RowDefinition x:Name="RibbonRow" Height="Auto"/>
            <RowDefinition x:Name="ClientRow" Height="*"/>
            <RowDefinition x:Name="StatusRow" Height="27"/>
        </Grid.RowDefinitions>
        <Grid.ColumnDefinitions>
            <ColumnDefinition Width="Auto"/>
            <ColumnDefinition/>
            <ColumnDefinition Width="Auto"/>
        </Grid.ColumnDefinitions>
        <!-- Application Ribbon -->
        <ribbon:Ribbon x:Name="ApplicationRibbon" Background="Transparent"
                prism:RegionManager.RegionName="{x:Static Common:Regions.RibbonRegion}" Grid.ColumnSpan="3">

            <ribbon:Ribbon.ContextualGroups>
                <ribbon:RibbonContextualTabGroup x:Name="cmAccount" Header="Account" Background="Green" BorderBrush="DarkGreen" Visibility="Collapsed" />
                <ribbon:RibbonContextualTabGroup x:Name="cmBill" Header="Bill" Background="Yellow" BorderBrush="Orange" Visibility="Collapsed" />
                <ribbon:RibbonContextualTabGroup x:Name="cmTag" Header="Tag" Background="Red" BorderBrush="DarkRed" Visibility="Collapsed" />
                <ribbon:RibbonContextualTabGroup x:Name="cmTarget" Header="Target" Background="OliveDrab" BorderBrush="Olive" Visibility="Collapsed" />
                <ribbon:RibbonContextualTabGroup x:Name="cmTransaction" Header="Transactions" Background="Blue" BorderBrush="DarkBlue" Visibility="Collapsed" />
            </ribbon:Ribbon.ContextualGroups>

            <!-- Ribbon ApplicationMenu (defined here) -->
            <ribbon:Ribbon.Menu>
                <ribbon:Backstage Background="#FFFF9610" >
                    <ribbon:BackstageTabControl prism:RegionManager.RegionName="{x:Static Common:Regions.BackStageRegion}">
                        <ribbon:Button x:Name="saveButton" Header="Save" Icon="Pack://application:,,,/Hisaab.Client.Common;component/Resources/Images/16/Save.png" ribbon:KeyTip.Keys="S" Helpers:IndexHelper.Index="0" Command="{x:Static Common:GlobalCommands.Save}"/>
                        <ribbon:Button Header="Exit" Icon="Pack://application:,,,/Hisaab.Client.Common;component/Resources/Images/16/Exit.png" ribbon:KeyTip.Keys="X" Helpers:IndexHelper.Index="99" Command="{Binding ExitApplication}" />
                    </ribbon:BackstageTabControl>
                </ribbon:Backstage>
            </ribbon:Ribbon.Menu>

            <!-- Ribbon QuickAccessToolbar  (defined here) -->
            <ribbon:Ribbon.QuickAccessItems>
                <ribbon:QuickAccessMenuItem Target="{Binding ElementName=saveButton}" IsChecked="True" />
                <ribbon:QuickAccessMenuItem Target="{Binding ElementName=refreshButton}" IsChecked="True" />
            </ribbon:Ribbon.QuickAccessItems>

            <!-- Home Tab (defined here) -->
            <ribbon:RibbonTabItem Header="Home" >
                <ribbon:RibbonGroupBox Header="View" prism:RegionManager.RegionName="{x:Static Common:Regions.HomeViewGroup}">
                    <ribbon:Button x:Name="refreshButton" Header="Refresh" ribbon:KeyTip.Keys="R" Helpers:IndexHelper.Index="99" Command="{x:Static Common:GlobalCommands.Refresh}"
                                   LargeIcon="Pack://application:,,,/Hisaab.Client.Common;component/Resources/Images/32/Refresh.png"
                                   Icon="Pack://application:,,,/Hisaab.Client.Common;component/Resources/Images/16/Refresh.png" />
                </ribbon:RibbonGroupBox>
                <ribbon:RibbonGroupBox Header="Add" prism:RegionManager.RegionName="{x:Static Common:Regions.HomeAddGroup}">
                    <StackPanel Orientation="Vertical" Helpers:IndexHelper.Index="99">
                        <ItemsControl prism:RegionManager.RegionName="{x:Static Common:Regions.HomeAddMediumGroup}" />
                    </StackPanel>
                </ribbon:RibbonGroupBox>
                <ribbon:RibbonGroupBox Header="List" prism:RegionManager.RegionName="{x:Static Common:Regions.HomeListGroup}">
                </ribbon:RibbonGroupBox>

            </ribbon:RibbonTabItem>
            <!--<ribbon:RibbonTabItem Header="Tools" prism:RegionManager.RegionName="{x:Static Common:Regions.ToolsTabRegion}">
            </ribbon:RibbonTabItem>-->
        </ribbon:Ribbon>

        <!-- Workspace Region-->
        <nav:NavigationPane Grid.Row="1"  Grid.Column="0" prism:RegionManager.RegionName="{x:Static Common:Regions.NavigationRegion}" x:Name="navigationPane"
            BarTitle="{l:Translate NavigationPaneHeader}" Width="250" LargeItems="5" AutoStateManagement="False" SelectedItem="{Binding SelectedItem}"  >
        </nav:NavigationPane>

        <Border Grid.Row="1"  Grid.Column="1" BorderBrush="{Binding BorderBrush, ElementName=navigationPane}" BorderThickness="1" Background="White" Padding="6" Margin="2,2,4,4">
            <Border.Effect>
                <DropShadowEffect BlurRadius="4" ShadowDepth="0" Opacity="0.3" Color="#AC000000"/>
            </Border.Effect>

            <ContentControl prism:RegionManager.RegionName="{x:Static Common:Regions.WorkspaceRegion}" />
        </Border>
        <nav:NavigationPaneExpander
            Grid.Row="1"  Grid.Column="2" Orientation="Right" Margin="0,0,2,1" Width="200" IsMinimized="True"
            Header ="{l:Translate SummaryPaneHeader}"
            prism:RegionManager.RegionName="{x:Static Common:Regions.RightNavigationRegion}">

        </nav:NavigationPaneExpander>
        <StatusBar Grid.Row="2" Grid.ColumnSpan="3">
            <StatusBar.Items>
                <StatusBarItem Content="Ready" />
            </StatusBar.Items>
        </StatusBar>

    </Grid>
</ribbon:RibbonWindow>